package com.qdlc.p2p.dal.dao;

import java.text.ParseException;

import com.qdlc.p2p.dal.common.dao.BaseDao;
import com.qdlc.p2p.dal.dto.Notice;

public interface NoticeDao extends BaseDao<Notice> {

	/**
	 * 根据用户ID获取发送验证码（重置密码用）时间
	 * 
	 * @param userId 用户ID
	 * @param email 电子邮件
	 * @return long
	 * @throws ParseException if has error
	 */
	long getAddTimeByUserId(long userId, String email) throws ParseException;
	/**
	 * 根据用户ID获取发送验证码（找回密码用）时间
	 * 
	 * @param userId 用户ID
	 * @param addr 接收地址
	 * @return long
	 * @throws ParseException if has error
	 * @throws Exception 
	 */
	long getNoticeAddTimeByUserId(String nid, String addr) throws Exception;
	
	
	/**
	 * App根据手机获取验证码
	 * @param nid
	 * @param phone
	 * @return
	 * @throws Exception
	 */
	Notice getNoticeByPhone(String nid,String phone) throws Exception;
}
